Skip to content

Fix broken bench: add missing test_context field to WeakPoint literal#132

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/awesome-edison-3711ps
Jun 21, 2026
Merged

Fix broken bench: add missing test_context field to WeakPoint literal#132
hyperpolymath merged 1 commit into
mainfrom
claude/awesome-edison-3711ps

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Problem

cargo bench fails to compile (and so does any cargo check --all-targets):

benches/scan_bench.rs:197: error[E0063]: missing field `test_context`
                           in initializer of `WeakPoint`

WeakPoint gained pub test_context: Option<TestContext> in v2.5.5
(src/types.rs:325), but the WeakPoint { … } literal in the
bench_location_extraction benchmark was never updated. This is a live
break, not latent: .github/workflows/e2e.yml runs cargo bench.

The library and binaries are unaffected — this was the only error.

Fix

Add test_context: None, to the benchmark's WeakPoint initializer.

Verification

cargo check --benchesFinished (clean; only the two pre-existing
library warnings remain).

🤖 Generated with Claude Code

https://claude.ai/code/session_0196movYBRwNw8vkLRaaFoTu


Generated by Claude Code

benches/scan_bench.rs built a WeakPoint literal without the
`test_context` field added to the struct in v2.5.5, which broke
`cargo bench` (run by .github/workflows/e2e.yml) and any
`cargo check --all-targets`. Add `test_context: None`.

Verified with `cargo check --benches` (Finished, clean).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0196movYBRwNw8vkLRaaFoTu
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 43 issues detected

Severity Count
🔴 Critical 6
🟠 High 15
🟡 Medium 22

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Issue in scorecard-enforcer.yml",
    "type": "scorecard_publish_with_run_step",
    "file": "scorecard-enforcer.yml",
    "action": "split_scorecard_publish_job",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in instant-sync.yml",
    "type": "secret_action_without_presence_gate",
    "file": "instant-sync.yml",
    "action": "peter-evans/repository-dispatch",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "unwrap_or(0) with dangerous default (3 occurrences, CWE-754)",
    "type": "unwrap_dangerous_default",
    "file": "/home/runner/work/panic-attack/panic-attack/src/axial/mod.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "unwrap_or(0) with dangerous default (1 occurrences, CWE-754)",
    "type": "unwrap_dangerous_default",
    "file": "/home/runner/work/panic-attack/panic-attack/src/ambush/mod.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "unwrap_or(0) with dangerous default (1 occurrences, CWE-754)",
    "type": "unwrap_dangerous_default",
    "file": "/home/runner/work/panic-attack/panic-attack/src/attestation/evidence.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "expect() in hot path (2 occurrences, CWE-754)",
    "type": "expect_in_hot_path",
    "file": "/home/runner/work/panic-attack/panic-attack/src/attestation/chain.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "medium"
  },
  {
    "reason": "unsafe block -- requires SAFETY comment (1 occurrences, CWE-676)",
    "type": "unsafe_block",
    "file": "/home/runner/work/panic-attack/panic-attack/src/jit_context.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "medium"
  },
  {
    "reason": "mem::transmute bypasses type safety with unchecked bit reinterpretation (12 occurrences, CWE-704)",
    "type": "transmute",
    "file": "/home/runner/work/panic-attack/panic-attack/src/jit_context.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "unwrap_or(0) with dangerous default (3 occurrences, CWE-754)",
    "type": "unwrap_dangerous_default",
    "file": "/home/runner/work/panic-attack/panic-attack/src/kanren/strategy.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "unwrap_or(0) with dangerous default (1 occurrences, CWE-754)",
    "type": "unwrap_dangerous_default",
    "file": "/home/runner/work/panic-attack/panic-attack/src/sweep_tracker/mod.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath hyperpolymath marked this pull request as ready for review June 21, 2026 01:52
@hyperpolymath hyperpolymath merged commit 36db570 into main Jun 21, 2026
27 of 28 checks passed
@hyperpolymath hyperpolymath deleted the claude/awesome-edison-3711ps branch June 21, 2026 01:53
hyperpolymath added a commit that referenced this pull request Jun 21, 2026
…133)

## What

Removes the legacy `.github/workflows/scorecard-enforcer.yml`.

## Why

This repo runs the OpenSSF Scorecard scan **twice** on every push:

- `scorecard.yml` — delegates to the shared `hyperpolymath/standards`
  scorecard **reusable** workflow (the modern, canonical path), and
- `scorecard-enforcer.yml` — a legacy self-contained job that runs its
**own**
  full Scorecard scan + SARIF upload again.

The governance **Check Workflow Staleness** gate explicitly requires
this
(seen failing on #132):
> Remove legacy scorecard-enforcer.yml …

Deleting the enforcer leaves a single Scorecard scan (via the reusable
workflow) and removes the redundant Actions run.

## Note (separate follow-up)

The same staleness gate also asks to refresh the Hypatia + Scorecard
reusable
**pins** to the current `hyperpolymath/standards` SHA. That needs read
access
to `hyperpolymath/standards` (not in this session's scope), so it's left
as a
follow-up — the staleness check may stay red on those pin items until
then.
This PR addresses only the duplicate-scan removal.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_0196movYBRwNw8vkLRaaFoTu

---
_Generated by [Claude
Code](https://claude.ai/code/session_0196movYBRwNw8vkLRaaFoTu)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants